Repository navigation
refactor(engine,editor): replay + adjustment-editor seam splits, ported to origin - #212
Merged
Merged
Conversation
K-Arthur
marked this pull request as ready for review
October 31, 2026 04:21
added 3 commits
October 30, 2026 22:32
…ules (Batch B/B-11)
Pure code motion: the 2,405-line AdjustmentEditor.tsx becomes a 15-line definition shell (same four named exports, dispatcher body verbatim, CSS import once) plus 24 modules under adjustmentEditors/ (every module <=400 lines; largest 322). LegacyAdjustmentEditor (807 lines) is split into a runtime hook (hooks and hueSaturationRange state stay in the base order) plus four plain phase renderers that keep the switch's case bodies verbatim; the nested LutEditor stays nested so its remount semantics are unchanged. HalftoneEditor (446 lines) becomes a hook, a shell with the S1-S5 JSX verbatim, and an unconditionally mounted advanced phase so the disclosure state lifetime is unchanged. BooleanRow, AdjustmentEditorProps, the family editors, the color converters, and the halftone options each get exactly one home; the original path re-exports the moved public names by name.
Proof: refactor-verify --base master --dest .../adjustmentEditors exit 0 {ok:true, baseCount:24, presentCount:33, missing:[], missingExports:[]}; covering suite AdjustmentEditor.test.tsx + AdjustmentPanel.test.tsx 32/32 passed before and after (18/18 direct target, test untouched); direct recursive tsc substitute 22 projects exit 0 with 0 diagnostics; biome clean; audit-health passed; partition proof 2,405 = 50 import-region + 2,307 moved + 23 wrapper + 25 blank lines. Baseline: 0 added, 0 grown, exactly one removed, 945 -> 944; repo map regenerated from the staged tree. No visual surface changed; no e2e/visual/lockfile/manifest/dated-doc changes.
(cherry picked from commit 42207fe)
…/C-01) Move the 3,898-line Canvas2D IR replay entry into one module per replay family plus orchestrator phases under packages/engine/src/replay/. The entry keeps its path and public surface as a 371-line orchestrator: the COMPLEXITY header, the four per-replay state bindings (now exported for sibling reads), the 281-line replayIr item pass, the two existing re-export statements and six explicit re-exports of the moved public names. Destination modules (all <=400 lines; largest text.ts 370, typography 355, effect 317, backdrop 312, primitive 290): types, color, isolatedSurface, primitive (paintShapeFill with its per-kind monomorphic switch, traceOutline, traceSquirclePath, paintPathFill, TAU), primitiveBounds, effect, effectDiagnostics, alphaMask, backdrop (shadowOps/alphaStrokeOps, backdrop blur, glass material), backdropCache, fill, fillImage, fillImageMask, table, raster, text (paintText dispatch), textRich, textCanonical, textPath, typography. No dispatch table, no renames, no behavior change. Proof: extraction script asserted 107/107 block assignment, source tiling identity and the 400-line cap before writing; independent verifier vs git show 8082741 reports base statements 107 = after statements 107 + 6 planned re-exports, AST-printer identity missing 0/extra 0, comments 238/238 exact (18 exact-text diffs are biome line-rewrap only); planned edits are export prefixes and 14 inline import() specifier rebases. refactor-verify --base master --dest packages/engine/src/replay exits 0 ({ok:true, baseCount:105,presentCount:105,missing:[],missingExports:[]}) before tests and after biome. Covering set unchanged: replay.test.ts 10/10, replay*.test.ts 29 files/224 tests, __goldens__ 3 files/12 tests, before and after, 0 failures; no test file edited. Direct recursive tsc substitute (20 package tsconfigs + apps/desktop + tests/e2e): 22 projects/0 failures before and after; engine tsc 0; biome clean on 21 files; audit-health exit 0; audit:emoji, audit:committed-imports and the staged commit checkpoint pass. Batch C benchmark: canonical replay bench before/after 100 and 1,000 rects plus an extended same-harness 10k/50k measurement (temporary untracked copy, removed before staging); audit-render-perf --ci before PASS and after two quiet runs PASS with no performance baseline regeneration (one intermediate loaded run flagged only the sub-millisecond 100-node panZoom ratio boundary and was re-verified). Architecture cycle identity delta recorded in SEAM_SPEC.md (engine madge identities 11 -> 19; the pre-existing audit-architecture gate was already red from B-05, no allowlist update). Baseline: added 0, grown 0, removed exactly packages/engine/src/replay.ts, 944 -> 943; report 6,333 scanned / 943 frozen / 0 stale / 0 WIP / 289,430 excess lines. Worktree .worktrees/C-01, branch seam/C/C-01-replay created from seam/B/B-11-adjustment-editor 9c9da88 and rebased onto local master 39e9be0 (HEAD 8082741); local master was not advanced. No visual surface changed; front-end gate not triggered and visual validation not required. (cherry picked from commit 2bf4871)
(cherry picked from commit 7694e7a)
K-Arthur
force-pushed
the
sync/seam-c-origin-20261030
branch
from
October 31, 2026 05:32
99fc7ae to
a154a2f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-cut of the local seam-C refactor batch onto current origin/master: B-11 adjustment editor split, C-01 Canvas2D replay split, and the replay cycle-resolution follow-up. Origin-only differences were folded in (canvas font string, raster tile copy, text-frame paint); local-line-only agent infra files and the C-02 canvas-input split are intentionally excluded (origin already carries a different inputPipeline and no agent-infra files). Verified: engine/editor tsc 0, biome clean, engine cycles at the pre-batch count. Draft for review; C-02 needs a separate re-cut.